package hk.polyu;

import java.awt.*;

import javax.swing.*;


public class LocalizationPanel extends JPanel{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -2800319481625166815L;
	
	protected JPanel panel = null;
	
	MapPanel mMapPanel = null;
	
	public LocalizationPanel() {
		this.setLayout(new BorderLayout());
		
		// Add left panel
		JPanel controlPanel = new JPanel();
		controlPanel.setBorder(BorderFactory.createTitledBorder("Control Panel"));
		// set layout
		controlPanel.setLayout(new GridBagLayout());
		

		// add an label
		JLabel trainLabel = new JLabel("Vehicle ID");
		GridBagConstraints c = new GridBagConstraints();
		c.fill = GridBagConstraints.HORIZONTAL;
		c.gridx = 0;
		c.gridy = 0;
		controlPanel.add(trainLabel, c);		
		
	
		this.add(controlPanel, BorderLayout.LINE_START);
		
		/**
		 * Add Map
		 */
		mMapPanel = new MapPanel();
		mMapPanel.setBorder(BorderFactory.createTitledBorder("Localization"));

		this.add(mMapPanel, BorderLayout.CENTER);
		
	}
	
	public MapPanel getMapPanel() {
		return this.mMapPanel;
	}



}
